package cn.topcodes.tcsf.admin.domain.entity;

import cn.topcodes.tcsf.admin.commons.domain.IdEntity;
import lombok.Data;
import javax.persistence.Table;
import java.util.Date;

/**
 * 限流规则
 * @author Unicorn
 * @date 2018-03-08 12:23:11
 */
@Data
@Table(name="t_sys_ratelimiter_rule")
public class RatelimiterRule extends IdEntity {
	
	public static final String FIELD_PERMITS_PER_SECOND = "permitsPerSecond";

	public static final String FIELD_ACQUIRE_PERMITS = "acquirePermits";

	public static final String FIELD_WARMUP_PERIOD = "warmupPeriod";

	public static final String FIELD_WARMUP_TIME_UNIT = "warmupTimeUnit";

	public static final String FIELD_IS_TRY = "isTry";

	public static final String FIELD_TIMEOUT = "timeout";

	public static final String FIELD_TIMEOUT_UNIT = "timeoutUnit";

	public static final String FIELD_URI = "uri";

	
	private Double permitsPerSecond;		//	每秒产生许可数量
	
	private Integer acquirePermits;		//	每次获取许可数量
	
	private Long warmupPeriod;		//	预热时间
	
	private String warmupTimeUnit;		//	预热时间单位
	
	private Boolean isTry;		//	尝试获取
	
	private Long timeout;		//	超时时间
	
	private String timeoutUnit;		//	超时时间单位
	
	private String uri;		//	URI
	

}